#include <pthread.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/syscall.h>

// g++ test.cc -o test -lpthread
void* thread_function(void* arg) {
    printf("Thread ID: %ld\n", syscall(SYS_gettid));
    sleep(10);
    return NULL;
}

int main() {
    pthread_t thread;
    pthread_create(&thread, NULL, thread_function, NULL);
    pthread_join(thread, NULL);
    return 0;
}
